This notebook is refer from the Microsoft resources: Azure fundamentals.
Get started with Azure by creating and configuring your first website in the cloud.
You’ve heard buzzwords about the cloud—scale, elasticity, microservices. Perhaps you’ve seen other companies be successful with the cloud and wondered how it could help you meet your business challenges or even grow your career. Did you know that more than 90% of Fortune 500 companies run on the Microsoft Cloud?
The cloud helps power your everyday life, and it’s often present in ways you don’t even realize. In this new connected world, we believe technology creates opportunity. To keep up with today’s ever-changing digital world, understanding cloud technology can help align your career to this exciting revolution.
In less time than it takes to eat lunch, you’ll create and configure your first website on Azure, a foundational building block of everything from digital transformation to the next big startup.
In this module, you will:
Learn what Microsoft Azure is and how it relates to cloud computing
Deploy and configure a web server
Learn how to scale up your server to give you more compute power
Use Azure Cloud Shell to interact with your web server
Azure is Microsoft’s cloud computing platform. Azure is a continually expanding set of cloud services that help your organization meet your current and future business challenges. Azure gives you the freedom to build, manage, and deploy applications on a massive global network using your favorite tools and frameworks.
Before we go further, let’s briefly define cloud computing.
Cloud computing is the delivery of computing services over the Internet using a pay-as-you-go pricing model. Put another way; it’s a way to rent compute power and storage from someone else’s data center.
Instead of maintaining CPUs and storage in your data center, you rent them for the time that you need them. The cloud provider takes care of maintaining the underlying infrastructure for you.
You can treat cloud resources like you would your resources in your own data center. When you’re done using them, you give them back. You’re billed only for what you use.
While this approach is great, the real value of the cloud is that it enables you to quickly solve your toughest business challenges and bring cutting edge solutions to your users.
The cloud helps you move faster and innovate in ways that were once nearly impossible.
In our ever-changing digital world, two trends emerge:
Teams are delivering new features to their users at record speeds.
End users expect an increasingly rich and immersive experience with their devices and with software.
Software releases were once scheduled in terms of months or even years. Today, teams are releasing features in smaller batches. Releases are now often scheduled in terms of days or weeks. Some teams even deliver software updates continuously—sometimes with multiple releases within the same day.
Think of all the ways you interact with devices that you couldn’t do just a few years ago. Many devices can recognize your face and respond to voice commands. Augmented reality changes the way you interact with the physical world. Household appliances are even beginning to act intelligently. These technologies are just a few examples, many of which are powered by the cloud.
To power your services and deliver innovative and novel user experiences more quickly, the cloud provides on-demand access to:
A nearly limitless pool of raw compute, storage, and networking components.
Speech recognition and other cognitive services that help make your application stand out from the crowd.
Analytics services that enable you to make sense of telemetry data coming back from your software and devices.
Azure provides over 100 services that enable you to do everything from running your existing applications on virtual machines to exploring new software paradigms such as intelligent bots and mixed reality.
Many teams start exploring the cloud by moving their existing applications to virtual machines that run in Azure. While migrating your existing apps to virtual machines is a good start, the cloud is more than just “a different place to run your virtual machines”.
For example, Azure provides AI and machine-learning services that can naturally communicate with your users through vision, hearing, and speech. It also provides storage solutions that dynamically grow to accommodate massive amounts of data. Azure services enable solutions that are not feasible without the power of the cloud.
Azure can help you tackle tough business challenges. You bring your requirements, creativity, and favorite software development tools. Azure brings a massive global infrastructure that’s always available for you to build your applications on.
Let’s take a quick tour of the high-level services Azure offers.
Here’s a big-picture view of the available services and features in Azure.
Let’s take a closer look at the most commonly used categories:
Compute
Networking
Storage
Mobile
Databases
Web
Internet of Things
Big Data
Artificial Intelligence
DevOps
Compute services are often one of the primary reasons why companies move to the Azure platform. Azure provides a range of options for hosting applications and services. Here are some examples of compute services in Azure:
Linking compute resources and providing access to applications is the key function of Azure networking. Networking functionality in Azure includes a range of options to connect the outside world to services and features in the global Microsoft Azure datacenters.
Azure networking facilities have the following features:
Azure provides four main types of storage services. These services are:
These services all share several common characteristics:
Durable and highly available with redundancy and replication.
Secure through automatic encryption and role-based access control.
Scalable with virtually unlimited storage.
Managed, handling maintenance and any critical problems for you.
Accessible from anywhere in the world over HTTP or HTTPS.
Azure enables developers to create mobile backend services for iOS, Android, and Windows apps quickly and easily. Features that used to take time and increase project risks, such as adding corporate sign-in and then connecting to on-premises resources such as SAP, Oracle, SQL Server, and SharePoint, are now simple to include.
Other features of this service include:
Offline data synchronization.
Connectivity to on-premises data.
Broadcasting push notifications.
Autoscaling to match business needs.
Azure provides multiple database services to store a wide variety of data types and volumes. And with global connectivity, this data is available to users instantly.
Having a great web experience is critical in today’s business world. Azure includes first-class support to build and host web apps and HTTP-based web services. The Azure services focused on web hosting include:
People are able to access more information than ever before. It began with personal digital assistants (PDAs), then morphed into smartphones. Now there are smart watches, smart thermostats, even smart refrigerators. Personal computers used to be the norm. Now the internet allows any item that’s online-capable to access valuable information. This ability for devices to garner and then relay information for data analysis is referred to as the Internet of Things (IoT).
There are a number of services that can assist and drive end-to-end solutions for IoT on Azure.
Data comes in all formats and sizes. When we talk about Big Data, we’re referring to large volumes of data. Data from weather systems, communications systems, genomic research, imaging platforms, and many other scenarios generate hundreds of gigabytes of data. This amount of data makes it hard to analyze and make decisions. It’s often so large that traditional forms of processing and analysis are no longer appropriate.
Open source cluster technologies have been developed to deal with these large data sets. Microsoft Azure supports a broad range of technologies and services to provide big data and analytic solutions.
Artificial Intelligence, in the context of cloud computing, is based around a broad range of services, the core of which is Machine Learning. Machine Learning is a data science technique that allows computers to use existing data to forecast future behaviors, outcomes, and trends. Using machine learning, computers learn without being explicitly programmed.
Forecasts or predictions from machine learning can make apps and devices smarter. For example, when you shop online, machine learning helps recommend other products you might like based on what you’ve purchased. Or when your credit card is swiped, machine learning compares the transaction to a database of transactions and helps detect fraud. And when your robot vacuum cleaner vacuums a room, machine learning helps it decide whether the job is done.
Some of the most common Artificial Intelligence and Machine Learning service types in Azure are:
A closely related set of products are the cognitive services. These are pre-built APIs you can leverage in your applications to solve complex problems.
DevOps (Development and Operations) brings together people, processes, and technology, automating software delivery to provide continuous value to your users. Azure DevOps Services allows you to create build and release pipelines that provide continuous integration, delivery, and deployment for your applications. You can integrate repositories and application tests, perform application monitoring, and work with build artifacts. You can also work with and backlog items for tracking, automate infrastructure deployment and integrate a range of third-party tools and services such as Jenkins and Chef. All of these functions and many more are closely integrated with Azure to allow for consistent, repeatable deployments for your applications to provide streamlined build and release processes.
Some of the main DevOps services available with Azure are Azure DevOps Services and Azure DevTest Labs.
As a technology professional, you likely have expertise in a specific area. Perhaps you’re a storage admin or virtualization expert, or maybe you focus on the latest security practices. If you’re a student, you may still be exploring what interests you most.
No matter your role, most people get started with the cloud by creating a website. Here you’ll deploy a website hosted in an App Service.
Let’s review some basic terms and get your first website up and running.
Azure App Service is an HTTP-based service that enables you to build and host many types of web-based solutions without managing infrastructure. For example, you can host web apps, mobile back ends, and RESTful APIs in several supported programming languages. Applications developed in .NET, .NET Core, Java, Ruby, Node.js, PHP, or Python can run in and scale with ease on both Windows and Linux-based environments.
We aim to create a website in less than the time it takes to eat lunch. Therefore, we’re not going to write any code and will instead deploy a predefined application from the Microsoft Azure Marketplace.
The Microsoft Azure Marketplace is an online store that hosts applications that are certified and optimized to run in Azure. Many types of applications are available, ranging from AI + Machine Learning to Web applications. As you’ll see in a couple of minutes, deployments from the store are done via the Azure portal using a wizard-style user interface. This user interface makes evaluating different solutions easy.
We’re going to use one of the WordPress application options from the Azure Marketplace for our website.
Typically, the first thing we’d do is to create a resource group to hold all the things that we need to create. The resource group allows us to administer all the services, disks, network interfaces, and other elements that potentially make up our solution as a unit. We can use the Azure portal to create and manage our solution’s resource groups. However, keep in mind that you can also manage resources via a command line using the Azure CLI. The Azure CLI is a useful option should you need to automate the process in the future.
In the free Azure sandbox environment, you’ll use the pre-created resource group learn-6d691a9f-2e9e-45de-b18f-fdcdac189424, and you don’t need to do this step.
The free sandbox allows you to create resources in a subset of the Azure global regions. Select a region from this list when you create resources:
westus2
southcentralus
centralus
eastus
westeurope
southeastasia
japaneast
brazilsouth
australiasoutheast
centralindia
If you haven’t already, verify that you have activated the sandbox above. Activating the sandbox will allocate the subscription and resource group you will use in this exercise. This step is required for any Microsoft Learn exercises that use a sandbox.
Sign in to the Azure portal using the same account you activated the sandbox with.
Expand the left-hand navigation panel.
From the top of the Azure portal navigation list, select Create a resource.
This option takes you to the Azure Marketplace.
Next, you’re presented several options to configure your deployment. Enter the following information:
App Name: Choose a unique value for the App name. It will form part of a Fully Qualified Domain Name (FQDN).
Subscription: Make sure the Concierge Subscription is selected.
Resource Group: Select the Use existing radio button, then select the learn-6d691a9f-2e9e-45de-b18f-fdcdac189424 resource group from the drop-down list.
Database Provider: Select MySQL in App.
App Service plan/location: You’ll change the App Service plan in the next step.
Application Insights: Leave at the default configuration.
Your configuration should look like this:
Your configuration should look like this:
In the New App Service plan panel, enter a name for the new service plan.
For Location, pick Central US to make sure we pick a region that allows the service plan you will pick. Normally, you would pick the region that is closest to your customers while offering the services you need.
Select Pricing tier to see the performance and feature options of the various types of service plans.
The Spec Picker allows us to select a new pricing tier for our application. This screen opens to the Production tab, with the S1 pricing tier selected. We’ll select a new pricing tier from the Dev / Test tab for our website.
Select the Dev / Test tab and select the F1 pricing tier. Then select Apply.
Back on the New App Service plan panel, select OK to create the new plan and close the panel.
Finally, select the Create button to start the deployment of your new site.
The deployment of the new website can take a few minutes to complete, and you’re welcome to explore the portal further on your own.
We can track the progress of the deployment at any time.
Notice how resources are listed as they’re created and the status changes to a green check as each component in the deployment completes.
Copy the URL information. Open a new tab in your browser and use the information to browse to your new WordPress site. You can now configure your WordPress website and add content.
Recall from earlier, that we’re using an App Service to run our WordPress application. Here we’ll look at additional information exposed about our application and explore some of the available options to configure our website.
Let’s have a look at some of this information.
Open the Azure portal .
From the left-hand navigation menu, select Dashboard to access a list of all resources in your subscription. You may have to click the menu icon to show the navigation choices.
The information displayed here is near real-time data and gives a quick overview of the performance of your website. Problems with the site’s performance will manifest in these graphs as early warnings.
Suppose you deployed your website and it becomes popular. By looking at the graphs in the overview, you realize that your site can’t effectively manage all the requests it’s receiving. To solve the problem, you’ll need to increase the server’s hardware capacity.
Scale refers to adding network bandwidth, memory, storage, or compute power to achieve better performance.
You may have heard the terms scaling up and scaling out.
Scaling up, or vertical scaling means to increase the memory, storage, or compute power on an existing virtual machine. For example, you can add additional memory to a web or database server to make it run faster.
Scaling out, or horizontal scaling means to add extra virtual machines to power your application. For example, you might create many virtual machines configured in exactly the same way and use a load balancer to distribute work across them.
When you have more time, feel free to go through each section and explore the various options available.
The App Services has many configurable options available and groups these options in sections of functionality.
The first section displayed is a group of common options you’d access to get a view of the health of your application. However, each following section provides additional functionality and information.
For example, the Settings section gives you access to configure various aspects such as application settings, backups, custom domains, TLS/SSL settings, options to scale up the resources of the application, and so on.
Within each category, there are pricing tiers that will allow us to scale the resources available to our App service. These pricing tiers give us access to the additional features mentioned above.
We’ll leave the configuration on the F1 tier, but know that this pane is where you can go to make scaling adjustments in your app service if you have changes in load for your application.
Let’s now take a look at how to use the Cloud Shell to configure Azure resources, such as App Service.
The Azure portal offers a convenient user interface to search, install, and access the various Azure offerings available. You’ll find, however, some of these tasks are repetitive and are candidates for automation using a command-line enabled interface.
Azure Cloud Shell is a browser-based command-line experience for managing and developing Azure resources. Think of Cloud Shell as an interactive console that you run in the cloud.
Cloud Shell provides two experiences to choose from, Bash and PowerShell. Both include access to the Azure command-line interface called Azure CLI and to Azure PowerShell.
You can use any Azure management interface, including the Azure portal, Azure CLI, and Azure PowerShell, to manage Azure resources. For learning purposes, here you’ll use the Azure CLI to start and stop the WordPress site we created earlier.
Suppose you have several websites deployed and want to stop or start each of these websites without accessing each App service individually using the portal. This effort is an easy task that you can convert into a script using Cloud Shell and Azure CLI.
In this exercise, you’ll use the Cloud Shell window shown side by side with the exercise instructions. When normally accessing the Cloud Shell from within the Azure portal, you’ll click the Cloud Shell icon from the top navigation bar. This icon is sometimes within the ellipsis (…) menu icon next to your profile.
For this exercise, we’ll use the Cloud Shell experience as part of our sandbox implementation.
az account list list command. By default, the command returns a JSON string. However, we’ll format the output as a table to make the information easier to work with. Run the following command.Azure CLI:
az account list --output table
az group list command.Azure CLI:
az group list --output table
az resource list command. The command will return a list of resources. By specifying, --resource-type we can filter the result to include only the resource information related to websites.Run the following command.
Azure CLI:
az resource list \
--resource-group learn-5f08148d-b5aa-4aa6-8393-8165ef04776b \
--resource-type Microsoft.Web/sites
Here an example of the command’s output:
JSON:
{
"id": "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx/resourceGroups/learn-5f08148d-b5aa-4aa6-8393-8165ef04776b/providers/Microsoft.Web/sites/BlogFor",
"identity": null,
"kind": "app",
"location": "centralus",
"managedBy": null,
"name": "MyWebApp",
"plan": null,
"properties": null,
"resourceGroup": "learn-5f08148d-b5aa-4aa6-8393-8165ef04776b",
"sku": null,
"tags": null,
"type": "Microsoft.Web/sites"
}
Copy the value of name. We’ll use it in the next steps to first stop and then start our website.
az webapp stop command to stop the web application running in our app service. Replace <web app name> with the name of your web app you copied, then run this command to stop your web app.Azure CLI:
az webapp stop \
--resource-group learn-5f08148d-b5aa-4aa6-8393-8165ef04776b \
--name <web app name>
az webapp start command. Replace <web app name> with the name of your web app you copied, then run this command to start your web app.Azure CLI:
az webapp start \
--resource-group learn-5f08148d-b5aa-4aa6-8393-8165ef04776b \
--name <web app name>
Nice work! With your first website under your belt, you now have a sense of how Azure works and how easy it is to bring up a system, configure some software, and tear everything down when it’s no longer needed.
Azure provides services that can help transform the way your organization delivers new features to your users in ways you simply can’t do without the power of the cloud.
The sandbox automatically cleans up your resources when you’re finished with this module.
When you’re working in your own subscription, it’s a good idea at the end of a project to identify whether you still need the resources you created. Resources left running can cost you money. You can delete resources individually or delete the resource group to delete the entire set of resources.
Microsoft Learn provides learning paths based on your role and interests.
You’ve taken your first step on the Azure fundamentals learning path. Keep going to learn how Azure services such as compute, storage, networking, and security can help you unlock the power of the cloud and create that next great breakthrough idea.
If you’re currently an AWS user and would like to learn more about Azure services, refer to our article on comparing AWS to Azure services on the Azure Architecture Center.